package com.txd.mofa.view;

import android.os.Parcelable;


import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;

import com.kongzue.baseframework.BaseFragment;

import java.util.List;

/**
 * Created by Administrator on 2019/5/7.
 */

/**
 * 底部导航栏的viewpager切换适配器
 */
public class ViewPagerAdapter extends FragmentPagerAdapter {

    private List<BaseFragment> list;

    public ViewPagerAdapter(FragmentManager fm, List<BaseFragment> list) {
        super(fm);
        this.list = list;
    }

    @Override
    public Fragment getItem(int position) {
        return list.get(position);
    }

    @Override
    public int getCount() {
        return list.size();
    }

    @Override
    public Parcelable saveState() {
        return null;
    }
}
